package org.itboys.mobile.service.mongo.mobile;


/**
 * 作者：jiangxiong
 * 日期：2017年5月8日
 * 联系方式 ：empty90911@126.com
 * 描述：天街_商城_收藏（小区，用户，商品）__service
 */

import javax.annotation.Resource;

import org.itboys.mobile.entity.mongo.TianJieCollection;
import org.itboys.mongodb.core.MongoDataSource;

import org.itboys.mongodb.service.BaseMongoService;

import org.springframework.stereotype.Service;



@Service
public class TianJieMobileCollectionService extends BaseMongoService<TianJieCollection> {


	private static final long serialVersionUID = 9010883787150707087L;
	@Resource(name = "mobileDs")
	private MongoDataSource tianJieDataSource;

	@Override
	protected MongoDataSource getMongoDataSource() {
		return tianJieDataSource;
	}

	@Override
	protected Class<TianJieCollection> getEntityClass() {

		return TianJieCollection.class;
	}
	//添加收藏小区/门店/商品
	public void addCollection(Long memberId,Long otherId,Integer type){
			TianJieCollection collection = new TianJieCollection(memberId, type, otherId);
			super.save(collection);
	}

}
